<template>
	<view class="u-page">
		
		<view class="u-page_1"> 
			<view class="u-demo-block">
				<text class="u-demo-block__title" >步骤</text>
				<view class="u-demo-block__content">
					<u-steps
					    :current="3"
					    activeIcon="checkmark-circle"
					    inactiveIcon="arrow-right"
					>
						<u-steps-item
						    title="填写信息"
						    desc="10:30"
						>	
						</u-steps-item>
						<u-steps-item
						    title="资格认证"
						    desc="10:30"
						>	
						</u-steps-item>
						<u-steps-item
						    title="发放贷款"
						    desc="10:35"
						>
						</u-steps-item>
						<u-steps-item
						    title="到期还款"
						    desc="11:40"
						>
						</u-steps-item>
					</u-steps>
				</view>
			</view>
		</view>
		<!-- 申请贷款 -->
	
		<navigator url="/pages/about/about">
			了解产品>
		</navigator>
		
		<view>
			<image src="@/static/images/img1.png" style="width: 750rpx;height: 500rpx;"></image>
			
			<u-row customStyle="margin-bottom: 10px">
			    <u-col span="6">
			        <view class="demo-layout bg-purple-light"><image src="@/static/images/img2.png" style="width: 350rpx;"></image></view>
			    </u-col>
			    <u-col span="6">
			        <view class="demo-layout bg-purple">			<image src="@/static/images/img3.png" style="width: 350rpx;"></image>
</view>
			    </u-col>
			</u-row>
			
		</view>
		<view class="userbox">
		  <!-- <view class="txbox"></view> -->
		  <!-- <navigator class="login-link" url="/pages/index/index">点击登录</navigator> -->
		  <u-button v-if="isLoggedin" @click="Login_index" type="primary" shape="square"  style="width: 400rpx;" >登录后填写</u-button>
		  <u-button v-else type="primary" shape="square"  @click="information" style="width: 400rpx;" >立即填写</u-button>
		 
		</view>
      <!--  <u-button type="primary" shape="square"  @click="information" style="width: 400rpx;" >立即填写</u-button> -->
	<!-- 	产品介绍&广告 -->
	
	</view>
</template>

<script>
	import token from '@/common/token/token.js'
	
	export default {
		data() {
			return {
			isLoggedin: true
			}
		},
		
		onLoad() {
			console.log("token.id---------------home"+token.id);
			
			
			let id =  token.id;
			// console.log("qqqqqqq"+uni.getStorageSync('userInfo_id')+"wwwwwww");
			if(id!=0){
				this.isLoggedin=false
			};
			// console.log("id-----------"+token.id);
			// console.log("payload-------------"+token.username);
			
			// console.log("userid"+uni.getStorageSync('userid'));
			// console.log(uni.getStorageSync('token'));
			// console.log(uni.getStorageSync('userid'));
			// console.log(token.id);
		},
		methods: {
			information(){
				uni.navigateTo({
					url:'/pages/home/Information/Information'
				})
			},
			Login_index(){
				uni.reLaunch({
					url:"/pages/index/index"
				})
			},
			 refreshPage() {
			      // 执行页面刷新操作
				  
				  // const currentUrl = window.location.href;
				  
				  // // 在需要刷新的时候将页面重定向到当前 URL
				  // window.location.href = currentUrl;
				  // window.location.reload();
			    }
		},
		mounted() {
			
			// this.refreshPage();
		}
	}
</script>

<style>
	.u-page {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}
	.slot-icon {
		width: 21px;
		height: 21px;
		background-color: $u-warning;
		border-radius: 100px;
		font-size: 12px;
		color: #fff;
		line-height: 21px;
		text-align: center;
	}
	.u-page_1{
		width: 750rpx;
		height: 200rpx;
	}
</style>